#include "graph.h"
#include <QtGui/QApplication>
#include <QtGui>
#include "glbox.h"
int main(int argc, char *argv[])
{
	QApplication a(argc, argv);
	//graph w;
	//w.show();
	QPixmap kineticPix("kinetic.png");
	QPixmap bgPix("Time-For-Lunch-2.jpg");
	QPixmap eclipsePix("ellipse.png");
	QPixmap figure8Pix("figure8.png");

	QGraphicsScene scene(0, 0, 500, 500);
	QGraphicsPixmapItem *item = new QGraphicsPixmapItem(kineticPix);
	item->setOffset(-kineticPix.width()/2+100, -kineticPix.height()/2+100);
	item->setZValue(50);
	scene.addItem(item);
	//scene.addPixmap(kineticPix);

	QGraphicsPixmapItem *item2 = new QGraphicsPixmapItem(eclipsePix);
	item2->setOffset(-kineticPix.width()/2+130, -kineticPix.height()/2+130);
	item2->setZValue(50+10);
	scene.addItem(item2);

	QGraphicsPixmapItem *item3 = new QGraphicsPixmapItem(figure8Pix);
	item3->setOffset(-kineticPix.width()/2+150, -kineticPix.height()/2+150);
	item3->setZValue(50-10);
	scene.addItem(item3);


	QGraphicsView *view = new QGraphicsView(&scene);

	view->setWindowTitle(QT_TRANSLATE_NOOP(QGraphicsView, "Animated Tiles"));
	view->setViewportUpdateMode(QGraphicsView::BoundingRectViewportUpdate);
	view->setBackgroundBrush(bgPix);
	view->setCacheMode(QGraphicsView::CacheBackground);
	view->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform);
	view->show();

	QMainWindow w;
	GLWidget myObj;
	w.setCentralWidget(&myObj);
	w.show();

	return a.exec();
}
